package com.neu.eurekaconsumerbook.service;

import com.neu.dto.BookDto;
import com.neu.util.CommonResult;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

@Service
public class BookService {
    @Resource
    private RestTemplate restTemplate;

    public CommonResult doAdd(BookDto dto){
        CommonResult rst=null;
        rst=restTemplate.postForObject("http://EUREKAPROVIDER03:8003/book/add",
                dto,CommonResult.class);
        return  rst;
    }
}
